import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import api from './api/index';
import axios from './common/utils/axios';
import utils from './common/utils/utils';
import date from './common/utils/date';

// api列表
Vue.prototype.$http = api;
// 请求封装
Vue.prototype.$axios = axios;
// 常用工具类封装
Vue.prototype.$utils = utils;
// 时间方法封装
Vue.prototype.$date = date;

// 注册饿了么组件
import {
  Table,
  TableColumn,
  Pagination,
  Form,
  FormItem,
  Input,
  Radio,
  RadioGroup,
  Button,
  Select,
  Option,
  DatePicker,
  TimePicker,
  Col,
  Switch,
  Checkbox,
  CheckboxGroup,
} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Pagination)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Button)
Vue.use(Select)
Vue.use(Option)
Vue.use(DatePicker)
Vue.use(TimePicker)
Vue.use(Col)
Vue.use(Switch)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
